#ifndef _PODSERVER_H_
#define _PODSERVER_H_

#include <process.h>

#include "pod.h"
#include "SocketServer.h"

#define TCP_LISTEN_PORT 2006
#define MAX_NUM_CONNECTIONS 5

/*
 * POD SERVER COMMANDS:
 * move [x, y, z, roll, pitch, yaw]
 * pollinputs
 * start
 * stop
 * home
 * park
 * follow
 * getstate
 * verbose [on|off]
 */

class PodServer {
   private:
      void process_command(podcommand type, Socket*);
   public:
      static Pod pod;
      static SocketServer server;
      static bool verbose, verbose_poll, verbose_move;
      static bool polling, moving;
      static Socket *poll_client, *move_client;
      static int poll_count, move_count;
      PodServer(void);
      void run(void);
      static unsigned int __stdcall poll_loop(void*);
      static unsigned int __stdcall move_loop(void*);
};

#endif